.gantt-chart-container {
  font-family: var(--font-family);
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #fff;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}

.gantt-chart-header {
  background-color: var(--color-gray-100);
  border-bottom: 1px solid var(--color-gray-200);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gantt-chart-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-gray-800);
}

.gantt-chart-toolbar {
  display: flex;
  gap: 8px;
}

.gantt-chart-body {
  display: flex;
  height: calc(100% - 48px);
}

.gantt-chart-sidebar {
  width: 220px;
  border-right: 1px solid var(--color-gray-200);
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--color-gray-50);
}

.gantt-chart-main {
  flex: 1;
  overflow: auto;
  position: relative;
}

.gantt-chart-grid {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.gantt-chart-timeline {
  height: 44px;
  border-bottom: 1px solid var(--color-gray-200);
  background-color: var(--color-gray-100);
  position: sticky;
  top: 0;
  z-index: 10;
}

.gantt-chart-tasks {
  position: relative;
}

/* 任务样式 */
.gantt-task {
  position: absolute;
  height: 28px;
  margin: 8px 0;
  border-radius: var(--border-radius-sm);
  background-color: #e0e7ff; /* 使用与我们的主题匹配的颜色 */
  border: 1px solid var(--color-primary-light);
  padding: 0 10px;
  cursor: move;
  box-sizing: border-box;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  z-index: 5;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.gantt-task:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  z-index: 6;
}

.gantt-task.dragging {
  opacity: 0.85;
  transform: scale(1.02);
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.gantt-task-progress {
  position: absolute;
  height: 100%;
  top: 0;
  left: 0;
  background-color: rgba(67, 97, 238, 0.35); /* 更新为我们的主要颜色 */
  z-index: -1;
}

.gantt-task-label {
  font-size: 13px;
  line-height: 26px;
  color: var(--color-gray-800);
  font-weight: 500;
}

/* 里程碑样式 */
.gantt-milestone {
  position: absolute;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 24px solid var(--color-info);
  margin: 10px 0;
  z-index: 5;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.gantt-milestone:hover {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
  transform: translateY(-2px);
}

.gantt-milestone-label {
  position: absolute;
  top: 24px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-gray-700);
}

/* 调整大小控件 */
.gantt-task-resize-handle {
  position: absolute;
  width: 6px;
  height: 100%;
  top: 0;
  background-color: transparent;
  cursor: ew-resize;
  z-index: 7;
}

.gantt-task-resize-handle.left {
  left: 0;
}

.gantt-task-resize-handle.right {
  right: 0;
}

/* 依赖线样式 */
.gantt-dependencies {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 4;
}

.gantt-dependency-line {
  stroke: var(--color-gray-400);
  stroke-width: 1.5;
  fill: none;
  marker-end: url(#arrowhead);
  transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.gantt-dependency-line:hover {
  stroke: var(--color-primary);
  stroke-width: 2;
}

/* 关键路径 */
.gantt-task.critical {
  background-color: #ffe0f0; /* 使用与我们主题匹配的警告色 */
  border: 1px solid #f72585;
}

.gantt-dependency-line.critical {
  stroke: #f72585;
  stroke-width: 2;
}

/* 网格线 */
.gantt-grid-line-vertical {
  stroke: var(--color-gray-200);
  stroke-width: 1;
}

.gantt-grid-line-horizontal {
  stroke: var(--color-gray-200);
  stroke-width: 1;
}

.gantt-grid-line-today {
  stroke: var(--color-primary);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

/* 日期标签 */
.gantt-date-label {
  font-size: 12px;
  fill: var(--color-gray-600);
  text-anchor: middle;
  font-weight: 500;
}

/* 工具提示 */
.gantt-tooltip {
  position: absolute;
  background-color: var(--color-gray-800);
  color: white;
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  z-index: 1000;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

.gantt-tooltip:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  margin-left: -5px;
  border-width: 5px 5px 0;
  border-style: solid;
  border-color: var(--color-gray-800) transparent transparent transparent;
}

/* 任务拖拽中的放置指示器 */
.gantt-task-drop-indicator {
  position: absolute;
  height: 2px;
  background-color: var(--color-primary);
  z-index: 99;
  box-shadow: var(--shadow-sm);
}

/* 自定义滚动条样式 */
.gantt-chart-main::-webkit-scrollbar,
.gantt-chart-sidebar::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.gantt-chart-main::-webkit-scrollbar-track,
.gantt-chart-sidebar::-webkit-scrollbar-track {
  background: var(--color-gray-100);
  border-radius: 3px;
}

.gantt-chart-main::-webkit-scrollbar-thumb,
.gantt-chart-sidebar::-webkit-scrollbar-thumb {
  background: var(--color-gray-400);
  border-radius: 3px;
}

.gantt-chart-main::-webkit-scrollbar-thumb:hover,
.gantt-chart-sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--color-gray-500);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .gantt-chart-sidebar {
    width: 160px;
  }
}

@media (max-width: 576px) {
  .gantt-chart-sidebar {
    width: 120px;
  }
  
  .gantt-task-label {
    font-size: 11px;
  }
} 